package com.wudl.govern.service.impl;

import com.wudl.govern.domain.MetaIndex;
import com.wudl.govern.mapper.MetaIndexMapp;
import com.wudl.govern.service.MetaIndexService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * meta_index Service
 *
 * @author wudl
 */
@Service
public class MetaIndexServiceImpl implements MetaIndexService {

    @Autowired
    private MetaIndexMapp metaIndexMapp;

    /**
     * 分页查询
     */
    @Override
    public  List<MetaIndex> page(Integer page, Integer size) {
        PageHelper.startPage(page, size);
        return  metaIndexMapp.selectList();
    }

    /**
     * 获取
     */
    @Override
    public MetaIndex getById(Object id) {
        return metaIndexMapp.selectById(id);
    }

    /**
     * 保存
     */
    @Override
    public void save(MetaIndex metaIndex) {
        metaIndexMapp.insert(metaIndex);
    }

    /**
     * 更新
     */
    @Override
    public void updateById(MetaIndex metaIndex) {
        metaIndexMapp.updateById(metaIndex);
    }

    /**
     * 删除
     */
    @Override
    public void removeById(Object id) {
        metaIndexMapp.deleteById(id);
    }

}